  @extends('home.index.layout')
@section('content')
<!-- <div role="toolbar" class="c-featured-slider slick-initialized slick-slider" data-component="FeaturedArticlesSlider"> -->

<div id="focusViwer">

  <div id="imgADPlayer" style="margin:0 auto;width: 80%;">
    
</div> 
    <script> 
    PImgPlayer.addItem( "<a href=# target=_blank style=color:#000;text-decoration:none;></a>", "#", "{{ url('/hom/index/imgs/d1.jpg ') }} ");    
    PImgPlayer.addItem( "<a href=# target=_blank style=color:#000;text-decoration:none;></a>", "#", "{{ url('/hom/index/imgs/d2.jpg ') }} ");     
    PImgPlayer.addItem( "<a href=# target=_blank style=color:#000;text-decoration:none;></a>", "#", "{{ url('/hom/index/imgs/d3.jpg ') }} ");     
    PImgPlayer.addItem( "<a href=# target=_blank style=color:#000;text-decoration:none;></a>", "#", "{{ url('/hom/index/imgs/d4.jpg ') }} ");     
    PImgPlayer.init( "imgADPlayer", 1349, 370 );   
    </script>
  
</div>

<div class="o-wrapper c-home">
     <article id="articles-collection" class="o-matrix o-wrapper__contents">
     
     <div class="o-matrix__row">

     <div class="o-matrix__row">

@foreach($data as $goods)
@if($goods -> zstyle == 0)
<div class="o-matrix__row__unit goods" style='margin-bottom:20px;padding-left: 10px'>
    <div class="c-card c-card-article c-card--shadowed c-card-article--darken" data-post-id="722044">
          <label ga-track="event" ga-action="click" ga-event-category="Class" ga-event-label="Tag" class="c-card-article__label"><a class="c-card-article__label__link" href="#" target="_blank">
          @foreach($allData as $cate)
          @if($goods -> cate_id == $cate -> id)
            {{ $cate -> name }}
         
          @endif
          @endforeach
          </a></label>
        <div class="c-card-article__thumbnail" style="background-image:{{ url('/uploads') }}/{{ $goods -> img_head }}"><img class='img' width='100%' height='160' src="{{ url('/uploads') }}/{{ $goods -> img_head }}">
    </div>
          <div class="c-card-article__contents">
        <a class="c-card-article__link" href="{{ url('/home/content/detail') }}" target="_blank">
          <h1 class="c-card-article__title title">
            {{ $goods -> title }}
          </h1>
        </a>
        <div class="c-card-article__meta c-card-meta c-card-meta--bottom">
          <time class="c-card-article__time c-card-meta__info c-card-meta__info--left time">{{ $goods -> time }}</time>
          <span class="c-card-meta__info c-card-meta__info--right c-card-meta__info--like js-article-like-count">3</span>
          <span class="c-card-meta__info c-card-meta__info--right c-card-meta__info--comments">0</span>
        </div>
      </div>
        <a class="c-card-article__thumbnail__link more" href="{{ url('/home/index/detail') }}/{{ $goods -> id }}" target="_blank"></a>
  </div>
</div> 
@endif 

@if($goods -> zstyle ==1 )
  <!-- 第一排第二块产品项 -->
         <div class="o-matrix__row__unit o-matrix__row__unit--2x1" style="margin-bottom: 20px">
                <div class="c-card c-card-article c-card--shadowed c-card-article--darken c-card-article--thumbnail c-card-article--thumbnail__layer" data-post-id="722819">

                    <label class="c-card-article__label"><a class="c-card-article__label__link" href="分类网站连接">
                      @foreach($allData as $cate)
                        @if($goods -> cate_id == $cate -> id)
                         {{ $cate -> name }}         
                        @endif
                      @endforeach

                    </a></label>

                   <div class="c-card-article__thumbnail" style="background-image:url('{{ url("/uploads") }}/{{ $goods -> img_head }}')">
                   <a class="c-card-article__thumbnail__link" href="#" target="_blank"></a>
                   <h1 class="c-card-article__title"><a class="c-card-article__link" href="#" target="_blank">{{ $goods -> title }}</a></h1>
                   </div>
                </div>
         </div>
@endif

@if($goods -> zstyle ==2)

  <div class="o-matrix__row__unit" style="margin-bottom: 20px;padding-left:10px;padding-right: 10px;  ">
      <div class="c-card c-card-article c-card--shadowed" data-post-id="722742" style="margin-left:0px">
          <label ga-track="event" ga-action="click" ga-event-category="Class" ga-event-label="Tag" class="c-card-article__label"><a class="c-card-article__label__link" href="分类连接" target="_blank">
              @foreach($allData as $cate)
                @if($goods -> cate_id == $cate -> id)
                 {{ $cate -> name }}         
                @endif
              @endforeach
          </a></label>

          <div class="c-card-article__thumbnail" style="background-image:url('{{ url("/uploads") }}/{{ $goods -> img_head }}')"></div>

          <div class="c-card-article__contents">
            <a class="c-card-article__link" href="#" target="_blank"><h1 class="c-card-article__title">  <!-- 标题内容 --> {{ $goods -> title }} </h1>
            </a>

            <div class="c-card-article__meta c-card-meta c-card-meta--bottom">
                <time class="c-card-article__time c-card-meta__info c-card-meta__info--left">{{ $goods -> time }}</time>
                <span class="c-card-meta__info c-card-meta__info--right c-card-meta__info--like js-article-like-count">0</span>
                <span   class="c-card-meta__info c-card-meta__info--right c-card-meta__info--comments">1</span>
            </div>
          </div>

          <a class="c-card-article__thumbnail__link" href="#" target="_blank"></a>
      </div>
    </div> 
  
@endif

@if($goods -> zstyle ==3  )
  <!-- 大声么 开始 -->
    <div class="c-dasheng-sliders c-card swiper-container js-dasheng-main-swiper swiper-container-horizontal" style="background-image: url('{{ url("/uploads") }}/{{ $goods -> img_head }}'); width: 770px;margin:0px 10px 20px 10px;">
    <div class="c-dasheng-sliders__header">
      <h5 class="c-dasheng-sliders__category c-card-category c-card-category--reversed c-card-category--large">
        
        @foreach($allData as $cate)
          @if($goods -> cate_id == $cate -> id)
            {{ $cate -> name }}         
          @endif
        @endforeach
      </h5>
            <span class="c-dasheng-sliders__control">
              <span ga-track="event" ga-action="switch" ga-event-category="Domain" ga-event-label="Dasheng" ifr-dasheng-slider-prev="" class="c-dasheng-sliders__control__prev js-dasheng-prev-btn swiper-button-disabled"></span>
              
    </div>

    <div class="c-dasheng-sliders__wrapper swiper-wrapper">
              <a style="width: 790px;" href="#" class="c-dasheng-sliders__item js-dasheng-slider swiper-slide swiper-slide-active" target="_blank">
          <div data-clamped="" class="c-dasheng-sliders__content-container" data-clamp="child">
            <h3 class="c-dasheng-sliders__content">{{ $goods -> title }}</h3>
          </div>
          <div class="c-dasheng-sliders__meta c-card-meta">
            <span class="c-dasheng-sliders__meta__link c-card-meta__info c-card-meta__info--left">查看全文</span>
            <span class="c-dasheng-sliders__meta__author c-card-meta__info c-card-meta__info--right">—— {{ $goods -> abstract }}</span>
          </div>
        </a> 
      </div>
  </div>


@endif
@endforeach



</div>


</article>


    <aside data-bounds-bottom="320" data-bounds-top="425" data-component="AwesomeScroll" class="o-wrapper__asides" style="position: static;">


<!-- 右上角的广告位-->
<div class="o-widget c-jiong c-jiong--block c-jiong--commercial" id="jiong">
  <a rel="nofollow" target="_blank" href="{{ $addata -> url }}"><img alt="广告位" src="{{  url('/uploads') }}/{{ $addata -> adimg}}" class="c-jiong__image"></a>
</div>




<div data-component="RecommendArticleWidget" class="o-widget c-recommend-articles">
  <div class="c-recommend-articles__headline">推荐文章</div>

  <div style="" data-component="Scrollbar" class="inner-box ps-container ps-theme-default" data-ps-id="2f5ea3ed-5b73-8384-4470-f66c09b746e9">
  <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px;"><div class="ps-scrollbar-x" tabindex="0" style="left: 0px; width: 0px;"></div></div>

  <div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px;"><div class="ps-scrollbar-y" tabindex="0" style="top: 0px; height: 0px;"></div></div>

  <div class="c-recommend-articles__item"><div style="background-image: url('http://images.ifanr.cn/wp-content/uploads/2015/09/didi.jpg')" class="c-recommend-articles__image"><a target="_blank" title="【重磅】苹果向滴滴投资 10 亿美元，原因是可能是这个！" href="#" class="c-recommend-articles__image__link-overlay" ga-event-label="RecommendArticle" ga-event-category="Widget" ga-action="click" ga-track="event"></a></div><div class="c-recommend-articles__info"><h1 class="c-recommend-articles__title"><a target="_blank" href="#"><span>【重磅】苹果向滴滴投资 10 亿美元，原因是可能是这个！</span></a></h1><span class="c-recommend-articles__time">5-13 18:26</span></div></div>


  <div class="c-recommend-articles__item"><div style="background-image: url('http://images.ifanr.cn/wp-content/uploads/2016/05/stock-photo-robot-child-reading-a-book-in-the-workshop-of-its-creator-287641082.jpg')" class="c-recommend-articles__image"><a target="_blank" title="在让人工智能听懂人话的问题上，Google是这样做的" href="#" class="c-recommend-articles__image__link-overlay" ga-event-label="RecommendArticle" ga-event-category="Widget" ga-action="click" ga-track="event"></a></div><div class="c-recommend-articles__info"><h1 class="c-recommend-articles__title"><a target="_blank" href="#"><span>在让人工智能听懂人话的问题上，Google是这样做的</span></a></h1><span class="c-recommend-articles__time">5-14 03:12</span></div></div>
  </div>

  
</div>

<section data-component="RecentCommentsWidget" class="o-widget c-hot-comment-widget">
  <div class="o-widget__header c-hot-comment-widget-header">
    <h1 class="o-widget__header__title c-hot-comment-widget-header__title">最近评论</h1>
  </div>


  <ul data-component="Scrollbar" class="o-widget__items c-hot-comment-widget-items js-recent-comment-items ps-container ps-theme-default" data-ps-id="d005b513-ef72-1f4f-d9f4-2e767e53f72c">

  <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px;"><div class="ps-scrollbar-x" tabindex="0" style="left: 0px; width: 0px;"></div></div>

  <div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px;"><div class="ps-scrollbar-y" tabindex="0" style="top: 0px; height: 0px;"></div></div>

  <li class="c-hot-comment-widget__items__item c-hot-comment-widget-item js-hot-comment-widget-item"><a target="_blank" href="#" class="c-hot-comment-widget-item__wrap" ga-event-label="LatestComments" ga-event-category="Widget" ga-action="click" ga-track="event"><p class="c-hot-comment-widget-item__main">叫淘宝直通车，帮淘宝卖家做精准推广的。</p><p class="c-hot-comment-widget-item__meta"><span class="c-hot-comment-widget-item__meta__item-hint">评论于</span> <span class="u-clamp-line--1 u-inline c-hot-comment-widget-item__meta__item-link">亚马逊成美国网民购物搜索引擎首选，Google 最大饭碗被威胁</span></p><div class="c-hot-comment-widget-item__user-info"><span class="c-hot-comment-widget-item__user-info__username">刘 浩南</span> <img src="http://gravatar.ifanrx.com/avatar/6b9c5f160605c33e270e75e74a03fdab?s=48&amp;d=%2F%2Fifanr.b0.upaiyun.com%2Fsite-static%2Fifanr-2.0%2Fdist%2Fimages%2Fcommon%2Fgravatar.jpg" class="c-hot-comment-widget-item__user-info__avatar"></div></a>

  </li>

  
  </ul>
</section>

</aside> 
  </div>
   <button class="c-load-more__button js-load-more btn">加载更多</button>
    <script type="text/javascript">

        //分页
        
       $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                 }
          });
       var p = 1;
       
     
        alert($);
        //添加滚动事件
        $('.btn').on('click', function(){
            $.ajax({

                url:"{{ url('/home/index/index') }}",
                data:{p:p},
                type:"GET",
                success:function()
                {
                alert(111);
                   
                },

                error:function()
                {
                    alert(222);
                },
                dataType:'json'
            });
        alert(333);
        }

    </script>

  @endsection('content')